home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / rxdoscmd.zip / RXDOSDEF.ASM < prev    next >
Assembly Source File  |  1993-06-06  |  52KB  |  1,150 lines

  1.  
  2.  
  3.  
  4.  
  5.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  6.         ;  Data Structures and Definitions                              ;
  7.         ;...............................................................;
  8.  
  9.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  10.         ;  Real Time Dos Data Structure Definitions                     ;
  11.         ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
  12.         ;                                                               ;
  13.         ;  Data Structure Definitions                                   ;
  14.         ;                                                               ;
  15.         ;                                                               ;
  16.         ;  (c) Copyright 1990, 1992. Api Software and Mike Podanoffsky  ;
  17.         ;      All Rights Reserved Worldwide.                           ;
  18.         ;                                                               ;
  19.         ;  This product is protected under copyright laws and  may not  ;
  20.         ;  be reproduced  in whole  or in part, in any form  or media,  ;
  21.         ;  included but not limited to source listing, facimilie, data  ;
  22.         ;  transmission, cd-rom, or  floppy disk without the expressed  ;
  23.         ;  written consent of the author.                               ;
  24.         ;                                                               ;
  25.         ;  Licence for distribution in commercial use:                  ;
  26.         ;                                                               ;
  27.         ;  Api Software                                                 ;
  28.         ;  12 South Walker Street                                       ;
  29.         ;  Lowell,  MA   01851                                          ;
  30.         ;  508/ 454-4961.                                               ;
  31.         ;                                                               ;
  32.         ;...............................................................;
  33.  
  34.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  35.         ;  Default Configuration Parameters                             ;
  36.         ;...............................................................;
  37.  
  38. DEFAULT_FILES                   equ 8           ; MS DOS default is 8
  39. DEFAULT_BUFFERS                 equ 10          ; MS DOS default is 2
  40. DEFAULT_LASTDRIVE               equ 'E'         ; MS DOS default is e:
  41. DEFAULT_FCBOPENMODE             equ 2           ; change only if you want read-only
  42.  
  43. DEFAULT_MINENVIRONMENT          equ 400         ; bytes default environment space
  44.  
  45.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  46.         ;  Max Configuration Parameters Allowable                       ;
  47.         ;...............................................................;
  48.  
  49. CONFIGMAX_FILES                 equ 255         ; MS DOS default is 8 (value is max allowed)
  50. CONFIGMAX_BUFFERS               equ 99          ; MS DOS default is 2 (value is max allowed)
  51. CONFIGMAX_FCBS_X                equ 255         ; MS DOS default is 4 (value is max allowed)
  52. CONFIGMAX_FCBS_Y                equ 255         ; MS DOS default is 0 (value is max allowed)
  53.  
  54. CONFIGMIN_STACKS_X              equ  8          ; MS DOS default is 9
  55. CONFIGMAX_STACKS_X              equ 64
  56.  
  57. CONFIGMIN_STACKS_Y              equ 32          ; MS DOS default is 128
  58. CONFIGMAX_STACKS_Y              equ 512
  59.  
  60.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  61.         ;  DOS Functions                                                ;
  62.         ;...............................................................;
  63.  
  64. ProgramTerminate                equ 00h         ; Program Terminate
  65. KeyboardInput                   equ 01h         ; Keyboard Input
  66. DisplayOutput                   equ 02h         ; Display Output
  67. AuxInput                        equ 03h         ; Aux Input
  68. AuxOutput                       equ 04h         ; Aux Output
  69. PrinterOutput                   equ 05h         ; Printer Output
  70. DirectConsole                   equ 06h         ; Direct Console
  71. DirectConsoleInputNoEcho        equ 07h         ; Direct Console Input NoEcho
  72. ConsoleInputNoEcho              equ 08h         ; Console Input NoEcho
  73. PrintString                     equ 09h         ; Print String
  74. BufferedKeyboardInput           equ 0Ah         ; Buffered keyboard input
  75. GetLine                         equ BufferedKeyboardInput
  76. CheckKeyboardInput              equ 0Bh         ; Check keyboard input
  77. ClearBufferedKeyboardInput      equ 0Ch         ; Clear Buffered keyboard input
  78. DiskReset                       equ 0Dh         ; Disk reset
  79. SelectDisk                      equ 0Eh         ; Select disk
  80. OpenFileFCB                     equ 0Fh         ; Open file FCB
  81. CloseFileFCB                    equ 10h         ; Close file FCB
  82. SearchFirstFileFCB              equ 11h         ; Search first file FCB
  83. SearchNextFileFCB               equ 12h         ; Search next file FCB
  84. DeleteFileFCB                   equ 13h         ; Delete file FCB
  85. SeqReadFileFCB                  equ 14h         ; Seq read file FCB
  86. SeqWriteFileFCB                 equ 15h         ; Seq write file FCB
  87. CreateFileFCB                   equ 16h         ; Create file FCB
  88. RenameFileFCB                   equ 17h         ; Rename file FCB
  89. CurrentDisk                     equ 19h         ; Current disk
  90. SetDiskTransferAddress          equ 1Ah         ; Set disk transfer address
  91. SetDTA                          equ SetDiskTransferAddress
  92. GetDefaultDriveData             equ 1Bh         ; Get Default Drive Data
  93. GetDriveData                    equ 1Ch         ; Get Drive Data
  94. GetDefaultDriveParameterBlock   equ 1Fh         ; Get Default Drive Parameter Block
  95. ReadFileFCB                     equ 21h         ; Read file FCB
  96. WriteFileFCB                    equ 22h         ; Write file FCB
  97. FileSizeFCB                     equ 23h         ; File size FCB
  98. SetRelativeRecordFCB            equ 24h         ; Set relative record FCB
  99. SetIntVector                    equ 25h         ; Set interrupt vector
  100. CreateNewProgramSeg             equ 26h         ; Create new program seg
  101. RandomBlockReadFCB              equ 27h         ; Random block read FCB
  102. RandomBlockWriteFCB             equ 28h         ; Random block write FCB
  103. ParseFilenameFCB                equ 29h         ; Parse filename FCB
  104. GetDate                         equ 2Ah         ; Get date 
  105. SetDate                         equ 2Bh         ; Set date
  106. GetTime                         equ 2Ch         ; Get time
  107. SetTime                         equ 2Dh         ; Set time
  108. SetVerifySwitch                 equ 2Eh         ; Set verify switch
  109. GetDiskTransferAddress          equ 2Fh         ; Get disk transfer address
  110. GetDTA                          equ GetDiskTransferAddress
  111. GetDOSVersion                   equ 30h         ; Get DOS version
  112. TerminateStayResident           equ 31h         ; Terminate stay resident
  113. GetDriveParameterBlock          equ 32h         ; Undocumented (Get Drive Parameter Block)
  114. CtrlBreakCheck                  equ 33h         ; Ctrl break check
  115. GetIntVector                    equ 35h         ; Get interrupt vector
  116. GetFreeDiskSpace                equ 36h         ; Get free disk space
  117. GetSetSwitchChar                equ 37h         ; Get/set switch char
  118. CountryDependentInfo            equ 38h         ; Country dependent info
  119. CreateSubdirectory              equ 39h         ; Create subdirectory
  120. RemoveSubdirectory              equ 3Ah         ; Remove subdirectory
  121. ChangeSubdirectory              equ 3Bh         ; Change subdirectory
  122. CreateFile                      equ 3Ch         ; Create file
  123. OpenFile                        equ 3Dh         ; Open file
  124. CloseFile                       equ 3Eh         ; Close file
  125. ReadFile                        equ 3Fh         ; Read file
  126. WriteFile                       equ 40h         ; Write file
  127. DeleteFile                      equ 41h         ; Delete file
  128. MoveFilePointer                 equ 42h         ; Move file pointer
  129. ChangeFileMode                  equ 43h         ; Change file mode
  130. IoControl                       equ 44h         ; Io Control
  131. DuplicateFileHandle             equ 45h         ; Duplicate file handle
  132. ForceFileHandle                 equ 46h         ; Force file handle
  133. GetCurrentDirectory             equ 47h         ; Get current directory
  134. AllocateMemory                  equ 48h         ; Allocate memory
  135. FreeAllocatedMemory             equ 49h         ; Free allocated memory
  136. ModifyAllocatedMemory           equ 4Ah         ; Modify allocated memory
  137. ExecuteProgram                  equ 4Bh         ; ExecuteProgram
  138. TerminateProcess                equ 4Ch         ; Terminate process
  139. TerminateProgram                equ TerminateProcess
  140. GetReturnCode                   equ 4Dh         ; Get return code
  141. FindFirstFile                   equ 4Eh         ; Find first file
  142. FindNextFile                    equ 4Fh         ; Find next file
  143. SetPSPAddress                   equ 50h         ; Set PSP Address
  144. GetPSPAddress                   equ 51h         ; Get PSP Address
  145. GetDosDataTablePtr              equ 52h         ; Undocumented (Get DOS Data Table)
  146. GetVerify                       equ 54h         ; Get verify
  147. RenameFile                      equ 56h         ; Rename file
  148. SetFileDateTime                 equ 57h         ; Set file date time
  149. GetExtendedError                equ 59h         ; Get extended error
  150. CreateUniqueFile                equ 5Ah         ; Create unique file
  151. CreateNewFile                   equ 5Bh         ; Create new file
  152. LockFileAccess                  equ 5Ch         ; Lock file access
  153. GetMachineName                  equ 5Eh         ; Get machine name
  154. GetRedirectionList              equ 5Fh         ; Get redirection list
  155. GetActualFileName               equ 60h         ; Undocumented (Get Actual FileName)
  156. GetProgramSegmentPrefix         equ 62h         ; Get program segment prefix
  157. CapitalizeFunctions             equ 65h         ; Country Dependent Capitalization )
  158. SetHandlesCount                 equ 67h         ;
  159. CommitFile                      equ 68h         ;
  160. GetDiskSerialNumber             equ 69h         ;
  161. ExtendedOpenCreate              equ 6Ch         ;
  162.  
  163.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  164.         ;  Network Redirector (2F11) Functions                          ;
  165.         ;...............................................................;
  166.  
  167. NFSInstallCheck                 equ 00h         ; Install Check
  168. NFSRemoveDirectory              equ 02h         ; Remove Directory
  169. NFSMakeDirectory                equ 04h         ; Make Directory
  170. NFSChangeDirectory              equ 05h         ; Change Directory
  171. NFSCloseFile                    equ 06h         ; Close File
  172. NFSCommitFile                   equ 07h         ; Commit File
  173. NFSReadFile                     equ 08h         ; Read File
  174. NFSWriteFile                    equ 09h         ; Write File
  175. NFSLockRegion                   equ 0Ah         ; Lock Region
  176. NFSUnlockRegion                 equ 0Bh         ; Unlock Region
  177. NFSGetDiskSpace                 equ 0Ch         ; Get Disk Space
  178. NFSSetFileAttributes            equ 0Eh         ; Set File Attributes
  179. NFSGetFileAttributes            equ 0Fh         ; Get File Attributes
  180. NFSRenameFile                   equ 11h         ; Rename File
  181. NFSDeleteFile                   equ 13h         ; Delete File
  182. NFSOpenFile                     equ 16h         ; Open File
  183. NFSCreateFile                   equ 17h         ; Create File
  184. NFSFindFirst                    equ 1Bh         ; Find First
  185. NFSFindNext                     equ 1Ch         ; Find Next
  186. NFSCloseAllFiles                equ 1Dh         ; Close All Files
  187. NFSSetRedirection               equ 1Eh         ; Set Redirection
  188. NFSPrinterSetup                 equ 1Fh         ; Printer Setup
  189. NFSFlushBuffers                 equ 20h         ; Flush Buffers
  190. NFSSeekFromEnd                  equ 21h         ; Seek From End
  191. NFSTerminateProcess             equ 22h         ; Terminate Process
  192. NFSQualifyFilename              equ 23h         ; Qualify Filename
  193. NFSPrinterMode                  equ 25h         ; Printer Mode
  194.  
  195.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  196.         ;  Standard I/O Definitions                                     ;
  197.         ;...............................................................;
  198.  
  199. STDIN                           equ 00
  200. STDOUT                          equ 01
  201. STDERR                          equ 02
  202. STDAUX                          equ 03
  203. STDPRN                          equ 04
  204.  
  205.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  206.         ;  Seek Definitions                                             ;
  207.         ;...............................................................;
  208.  
  209. SEEK_BEG                        equ 00
  210. SEEK_CUR                        equ 01
  211. SEEK_END                        equ 02
  212.  
  213.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  214.         ;  Open Modes                                                   ;
  215.         ;...............................................................;
  216.  
  217. OPEN_ACCESS_READONLY            equ 00h
  218. OPEN_ACCESS_WRITEONLY           equ 01h
  219. OPEN_ACCESS_READWRITE           equ 02h
  220.  
  221. OPEN_SHARE_COMPATABILITY        equ 00h
  222. OPEN_SHARE_DENYREADWRITE        equ 10h
  223. OPEN_SHARE_DENYREAD             equ 20h
  224. OPEN_SHARE_DENYWRITE            equ 30h
  225. OPEN_SHARE_DENYNONE             equ 40h
  226. OPEN_SHARE_NOINHERIT            equ 80h
  227.  
  228.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  229.         ;  Control Check Definitions                                    ;
  230.         ;...............................................................;
  231.  
  232. getControlC                     equ 00h         ; Get ControlC Check Flag                                ;
  233. setControlC                     equ 01h         ; Set ControlC Check Flag                                ;
  234. getStartupDrive                 equ 05h         ; Get Startup Drive                                      ;
  235. getExtDosVersion                equ 06h         ; Get DOS Version                                        ;
  236.  
  237.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  238.         ;  Terminate Codes                                              ;
  239.         ;...............................................................;
  240.  
  241. TERMINATE_NORMAL                equ 00h         ; process completed with a 4C 
  242. TERMINATE_CONTROLC              equ 01h         ; process was cancelled
  243. TERMINATE_DEVICEERROR           equ 02h         ; abort in device handler
  244. TERMINATE_TSR                   equ 03h         ; terminated but stayed resident
  245.  
  246.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  247.         ;  65h Country Dependent Capitalization                         ;
  248.         ;...............................................................;
  249.  
  250. _CapCharacter                   equ  20h        ; character capitalization
  251. _CapLengthDefString             equ  21h        ; length defined string capitalization
  252. _CapString                      equ  22h        ; ASCIZ capitalization
  253. _CountryDepYesNo                equ  23h        ; does character represent Yes/No response
  254. _CapFnCharacter                 equ 0A0h        ; filename character capitalization
  255. _CapFnLengthDefString           equ 0A1h        ; filename length defined string capitalization
  256. _CapFnString                    equ 0A2h        ; filename ASCIZ capitalization                    ;
  257.  
  258.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  259.         ;  Structure Definitions                                        ;
  260.         ;...............................................................;
  261.  
  262.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  263.         ;  File Name                                                    ;
  264.         ;...............................................................;
  265.  
  266.         FILENAME struc
  267.  
  268. fnName                  db '????????'
  269. fnExtension             db '???'
  270.  
  271.         FILENAME ends
  272.  
  273.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  274.         ;  Directory Entries                                            ;
  275.         ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
  276.         ;  See Functions                                                ;
  277.         ;                                                               ;
  278.         ;       _SearchFirstFileFCB           11h                       ;
  279.         ;       _SearchNextFileFCB            12h                       ;
  280.         ;...............................................................;
  281.  
  282.         DIRENTRY struc
  283.  
  284. deName                  db '????????'
  285. deExtension             db '???'
  286. deAttributes            db ?
  287. deReserved              db 10 dup (?)
  288. deTime                  dw ?                    ; Time Format
  289.                                                 ;   0 - 4 Two second intervals
  290.                                                 ;   5 -10 Minutes (0 - 59)
  291.                                                 ;  11 -15 Hours (0 - 23)
  292.  
  293. deDate                  dw ?                    ; Date Format
  294.                                                 ;   0 - 4 Day (1 - 31)
  295.                                                 ;   5 - 8 Month (1 - 12)
  296.                                                 ;   9 -15 Year since 1980
  297.  
  298. deStartCluster          dw ?
  299. deFileSize              dd ?
  300.  
  301.         DIRENTRY ends
  302.  
  303. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  304. ;  Attribute bits
  305. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  306. ATTR_NORMAL             equ 00h
  307. ATTR_READONLY           equ 01h
  308. ATTR_HIDDEN             equ 02h
  309. ATTR_SYSTEM             equ 04h
  310. ATTR_VOLUME             equ 08h
  311. ATTR_DIRECTORY          equ 10h
  312. ATTR_ARCHIVE            equ 20h
  313. ATTR_MASK               equ 1Fh
  314.  
  315. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  316. ;  Special Characters
  317. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  318. DIRENTRY_NEVERUSED      equ 00h
  319. SPECIAL_CHAR            equ 05h
  320. DIRENTRY_DELETED        equ 0E5h
  321.  
  322.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  323.         ;  Find First/ Find Next                                        ;
  324.         ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
  325.         ;  See Functions                                                ;
  326.         ;                                                               ;
  327.         ;       _FindFirstFile           4Eh                            ;
  328.         ;       _FindNextFile            4Fh                            ;
  329.         ;...............................................................;
  330.  
  331.         FINDENTRY struc
  332.  
  333. findSrchDrive           db ?
  334. findSrchName            db '????????'           ; name to search
  335. findSrchExtension       db '???'
  336. findSrchAttributes      db ?
  337. findDirEntry            dw ?                    ; dir entry (;** Not Double !!)
  338. findDirBegCluster       dw ?                    ; dir beg cluster
  339. findDirCurrCluster      dw ?                    ; dir curr cluster
  340. findCCBPointer          dw ?                    ; ccb pointer
  341.  
  342. findFileAttribute       db ?
  343. findFileTime            dw ?
  344. findFileDate            dw ?
  345. findFileSize            dd ?
  346. findFileName            db 13 dup (?)           ; null terminated name
  347.  
  348.         FINDENTRY ends
  349.  
  350.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  351.         ;  File Tables                                                  ;
  352.         ;...............................................................;
  353.  
  354.         FT struc
  355.  
  356. nextFTPointer           dd ?
  357. numberSFTEntries        dw ?
  358.  
  359.         FT ends
  360.  
  361.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  362.         ;  System File Tables                                           ;
  363.         ;...............................................................;
  364.  
  365.         SFT struc
  366.  
  367. sftRefCount             dw ?
  368. sftMode                 dw ?
  369. sftFileAttrib           db ?
  370. sftDevInfo              dw ?                    ; device info
  371. sftDCB                  dd ?                    ; file DCB address or driver address
  372. sftBegCluster           dw ?
  373. sftTime                 dw ?
  374. sftDate                 dw ?
  375. sftFileSize             dd ?
  376. sftFilePosition         dd ?
  377. sftRelCluster           dw ?
  378. sftCurCluster           dw ?                    ; 0000 if never read/ written
  379. sftDirSector            dd ?                    ; dir sector containing entry
  380. sftDirIndex             db ?                    ; used in search next
  381. sftFileName             db '????????'
  382. sftFileExtension        db '???'
  383. sftShareSftPointer      dd ?                    ; points to other shared file
  384. sftOwnerMachine         dw ?
  385. sftOwnerPSP             dw ?
  386. sftShareRecordPtr       dw ?                    ; share record pointer
  387.  
  388.         SFT ends
  389.  
  390. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  391. ;  Mode
  392. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  393.  
  394. sftENTRY_ISFCB          equ 8000h
  395. sftDENY_NONE            equ 0040h
  396. sftDENY_READ            equ 0030h
  397. sftDENY_WRITE           equ 0020h
  398. sftEXCLUSIVE            equ 0010h
  399. sftNET_FCB              equ 0070h
  400. sftWRITE                equ 0001h
  401. sftREAD                 equ 0000h
  402.  
  403. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  404. ;  sftDevInfo
  405. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  406.  
  407. sftShared               equ 8000h
  408. sftDateset              equ 4000h
  409. sftIoctl                equ 4000h
  410. sftIsDevice             equ 0080h
  411. sftEof                  equ 0040h
  412. sftBinary               equ 0020h
  413. sftSpecial              equ 0010h
  414. sftIsclock              equ 0008h
  415. sftIsnul                equ 0004h
  416. sftIsstdout             equ 0002h
  417. sftIsstdin              equ 0001h
  418. sftWritten              equ 0040h
  419. sftDrivemask            equ 003fh
  420.  
  421.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  422.         ;  File Control Blocks                                          ;
  423.         ;...............................................................;
  424.  
  425.         FCB struc
  426.  
  427. fcbDrive                db ?
  428. fcbName                 db '????????'
  429. fcbExtension            db '???'
  430. fcbCurrBlockNo          dw ?
  431. fcbRecordSize           dw ?
  432. fcbFileSize             dd ?
  433. fcbDate                 dw ?
  434. fcbTime                 dw ?
  435. fcbSFN                  db ?                    ; handle to sft system
  436. fcbFlags                db ?                    ; modified flags
  437. fcbDHD                  dd ?                    ; device header/DCB
  438. fcbBegClusterNo         dw ?                    ; start of file cluster number
  439. fcbCurrRecNo            db ?
  440. fcbRandomRecNo          dd ?
  441.  
  442.         FCB ends
  443.  
  444.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  445.         ;  Extended FCB Header                                          ;
  446.         ;...............................................................;
  447.  
  448.         ExtendedFCBHdr struc
  449.  
  450. extSignature            db ?
  451.                         db '?????'
  452. extAttribute            db ?
  453.  
  454.         ExtendedFCBHdr ends
  455.  
  456.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  457.         ;  System Access Control Block                                  ;
  458.         ;...............................................................;
  459.  
  460.         DISKACCESS struc
  461.  
  462. diskAcDrive             dw ?                    ; set at init
  463. diskAcPosition          dd ?                    ; set at init
  464. diskAcFileSize          dd ?                    ; set at init
  465. diskAcBegCluster        dw ?                    ; set at init (cluster #)
  466. diskAcCurCluster        dw ?                    ; computed    (cluster #)
  467. diskAcCurSector         dd ?                    ; computed    (sector  #)
  468. diskAcOffAtBegBuffer    dd ?                    ; computed    (file offset )
  469. diskAcOffAtBegCluster   dd ?                    ; computed    (file offset )
  470. diskAcBufferPtr         dd ?                    ; dynamically assigned
  471.  
  472.         DISKACCESS ends
  473.  
  474.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  475.         ;  Directory Access Block                                       ;
  476.         ;...............................................................;
  477.  
  478.         DIRACCESS struc
  479.  
  480. fileAcDrive             dw ?                    ; which drive file is located
  481. fileAcCluster           dw ?                    ; which cluster file is located
  482. fileAcDirCluster        dw ?                    ; which dir cluster
  483. fileAcDirSector         dd ?                    ; which dir sector
  484. fileAcDirOffset         dw ?                    ; offset in directory sector
  485. fileAcBufferPtr         dd ?                    ; pointer to directory buffer
  486. fileAcDevicePtr         dd ?                    ; if device, device service address
  487. fileAcNameOffset        dw ?                    ; offset in Expanded Name
  488. fileAcExpandedName      db 128 dup (?)
  489.  
  490.         DIRACCESS ends
  491.  
  492. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  493. ;  Flags for file parsing
  494. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  495.  
  496. FILEIS_FCB              equ 0001h               ; file passed is an FCB
  497. FILE_NODEVICENAME       equ 0002h               ; path may not contain a device name
  498. FILEHAS_WILDCHARS       equ 0004h               ; path may contain wild characters
  499. FILEHAS_NOFILENAME      equ 0008h               ; path may not contain filename
  500. FILECANNOT_BEDEFINED    equ 0010h               ; filename must not exist
  501. FILECANNOT_BEDIRECTORY  equ 0020h               ; filename must not exist
  502. FILEMAY_EXIST           equ 0040h               ; file may exist (cluster not -1 )
  503. FILE_ORDEVICE           equ 0000h               ; file or device must exist
  504.  
  505.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  506.         ;  Std Character I/O Redirection Table                          ;
  507.         ;...............................................................;
  508.  
  509.         STDREDIREC struc
  510.  
  511. stdDriverName           db '????????'           ; driver name
  512. stdIOHandle             dw ?                    ; handle assigned, if any
  513. stdDevInfo              dw ?                    ; device assign bits
  514.  
  515.         STDREDIREC ends
  516.  
  517. stdRedirec_Aux          equ 0
  518. stdRedirec_Con          equ 1
  519. stdRedirec_Prn          equ 2
  520.  
  521.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  522.         ;  Drive Parameter Block                                        ;
  523.         ;...............................................................;
  524.  
  525.         DPB struc
  526.  
  527. _dpbDrive               db ?
  528. _dpbUnit                db ?
  529. _dpbBytesPerSector      dw ?
  530. _dpbClusterSizeMask     db ?
  531. _dpbClusterSizeShift    db ?
  532. _dpbFirstFAT            dw ?
  533. _dpbNumCopiesFAT        db ?
  534. _dpbMaxAllocRootDir     dw ?
  535. _dpbFirstDataSector     dw ?
  536. _dpbMaxClusterNumber    dw ?
  537.  
  538. _dpbSectorsPerFat       dw ?                    ; in DOS ver 5 this became a word
  539. _dpbFirstDirSector      dw ?
  540. _dpbptrDeviceDriver     dd ?
  541. _dpbMediaDescriptor     db ?
  542. _dpbAccessFlag          db ?                    ; -1 if must be rebuilt
  543. _dpbNextDPB             dd ?
  544. _dpbNextFree            dw ?                    ; cluster where to search for next free
  545. _dpbFreeCount           dw ?                    ; number of free clusters remaining
  546.  
  547.         DPB ends
  548.  
  549.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  550.         ;  Drive Parameter Block                                        ;
  551.         ;...............................................................;
  552.  
  553.         BPB struc
  554.  
  555. _bpbBytesPerSector      dw ?
  556. _bpbSectorsPerCluster   db ?
  557. _bpbResSectors          dw ?
  558. _bpbNumCopiesFAT        db ?
  559. _bpbMaxAllocRootDir     dw ?
  560. _bpbMaxSectors          dw ?                    ; if zero, see huge sectors
  561. _bpbMediaDescriptor     db ?
  562. _bpbSectorsPerFat       dw ?
  563. _bpbSectorsPerTrack     dw ?
  564. _bpbHeads               dw ?
  565. _bpbHiddenSectors       dd ?
  566. _bpbHugeSectors         dd ?
  567.  
  568.         BPB ends
  569.  
  570.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  571.         ;  Current Directory Entries                                    ;
  572.         ;...............................................................;
  573.  
  574.         CDS struc
  575.  
  576. _cdsActualDirectory     db 67 dup (?)           ; asciz name
  577. _cdsFlags               dw ?
  578. _cdsPtrToDPB            dd ?
  579. _cdsStartClusterDir     dw ?
  580. _cdsNonSubstOffset      db ?
  581. _cdsPtrToIFSDriver      dd ?
  582.  
  583.         CDS ends
  584.  
  585. ; for Networked Drives
  586.  
  587. _cdsRedirectIFSPtr      equ 73
  588. _cdsParameter           equ 77
  589.  
  590.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  591.         ;  Memory Management Blocks                                     ;
  592.         ;...............................................................;
  593.  
  594.         MEMBLOCK struc
  595.  
  596. _memSignature           db ?                    ; always 4D
  597. _memParent              dw ?                    ; seg address of owner
  598. _memAlloc               dw ?                    ; allocated size
  599. _memReserved            db '???'
  600. _memPgmName             db 8 dup (?)            ; program name or null
  601.  
  602.         MEMBLOCK ends
  603.  
  604. _RxDOS_MEMSIGNATURE     equ 4Dh
  605. _RxDOS_ENDSIGNATURE     equ 5Ah
  606. _RxDOS_PARENT_SIGNATURE equ 0008h               ; mem parent signature
  607. _MIN_RxDOS_ALLOC_PARAS  equ 2
  608.  
  609.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  610.         ;  Buffers (Cache) Block                                        ;
  611.         ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
  612.         ;                                                               ;
  613.         ;  Compatability note:                                          ;
  614.         ;                                                               ;
  615.         ;  This buffer's definition is slightly different from MSDOS    ;
  616.         ;  but appears to function in exactly the same way.             ;
  617.         ;                                                               ;
  618.         ;...............................................................;
  619.  
  620.         CCB struc
  621.  
  622. ccbNext                 dw ?                    ; next cache control block 
  623. ccbPrev                 dw ?                    ; prev cache control block 
  624. ccbDrive                db ?                    ; drive
  625. ccbStatus               db ?                    ; status flags
  626. ccbLBN                  dd ?                    ; block number (sector)
  627. ccbNumCopies            db ?                    ; number of FAT copies (*)
  628. ccbSectorOffsets        dw ?                    ; offset between FAT sectors (*)
  629. ccbDPB                  dd ?                    ; pointer to drive parameter block
  630. ccbCount                dw ?                    ; count if remote
  631. ccbSFTIdent             db ?                    ; system sft Handle
  632. ccbData                 db 512 dup ( ? )        ; data
  633.                                                 ; (*) unused by RxDOS
  634.  
  635.         CCB ends
  636.  
  637. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  638. ;  Flags
  639. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  640.  
  641. ccb_isFAT               equ 02h
  642. ccb_isDIR               equ 04h
  643. ccb_isDATA              equ 08h
  644. ccb_isVALID             equ 20h                 ; contains valid data 
  645. ccb_isDIRTY             equ 40h
  646. ccb_isREMOTE            equ 80h
  647.  
  648.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  649.         ;  Program Segment Prefix (PSP)                                 ;
  650.         ;...............................................................;
  651.  
  652.         PSP struc
  653.  
  654. pspInt20                dw ?                    ; Int 20 instruction
  655. pspNextParagraph        dw ?                    ; seg address of next paragraph
  656.                         db ?                    ; not used
  657. pspDispatcher           db 5 dup ( ? )          ; long call to MS-DOS
  658. pspTerminateVect        dd ?                    ; Terminate Vector (Int 22h)
  659. pspControlCVect         dd ?                    ; Control-C Vector (Int 23h)
  660. pspCritErrorVect        dd ?                    ; CritError Vector (Int 24h)
  661. pspParentId             dw ?                    ; PSP seg of parent
  662. pspHandleTable          db 20 dup ( ? )         ; Allocated Handle Table
  663. pspEnvironment          dw ?                    ; seg address of environment block
  664. pspUserStack            dd ?                    ; user stack
  665. pspFileHandleCount      dw ?                    ; handles allocated
  666. pspFileHandlePtr        dd ?                    ; pointer to handle table
  667.                         db  24 dup ( ? )
  668. pspDosCall              db   3 dup ( ? )
  669.                         db   9 dup ( ? )
  670. pspFCB_1                db  16 dup ( ? )        ; FCB 1
  671. pspFCB_2                db  16 dup ( ? )        ; FCB 2
  672.                         db   4 dup ( ? )
  673. pspCommandTail          db 128 dup ( ? )        ; command tail (also default DTA )
  674.  
  675.         PSP ends
  676.  
  677.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  678.         ;  Exe File Header                                              ;
  679.         ;...............................................................;
  680.  
  681.         EXEHEADER struc
  682.  
  683. exeSignature            dw ?                    ; .EXE file signature
  684. exeExtraBytes           dw ?                    ; number of bytes in last partial page
  685. exePages                dw ?                    ; number of whole and partial pages
  686. exeRelocItems           dw ?                    ; number of pointers in reloc table
  687. exeHeaderSize           dw ?                    ; size of header, in pages
  688. exeMinAlloc             dw ?                    ; minimum allocation
  689. exeMaxAlloc             dw ?                    ; maximum allocation
  690. exeInitSS               dw ?                    ; initial ss value
  691. exeInitSP               dw ?                    ; initial sp value
  692. exeChecksum             dw ?                    ; complemented checksum
  693. exeInitIP               dw ?                    ; initial ip value
  694. exeInitCS               dw ?                    ; initial cs value
  695. exeRelocTable           dw ?                    ; byte offset to reloc table
  696. exeOverlay              dw ?                    ; overlay number
  697.  
  698.         EXEHEADER ends
  699.  
  700. EXE_SIGNATURE           equ 5A4DH               ; 'MZ'
  701.  
  702.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  703.         ;  Execution State                                              ;
  704.         ;...............................................................;
  705.  
  706.         EXECSTATE struc
  707.                         dw ?
  708. execFlags               dw ?
  709. execProgName            dd ?
  710. execPSP                 dw ?
  711. execStartAddr           dd ?
  712. execProgSize            dd ?
  713.  
  714.         EXECSTATE ends
  715.  
  716.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  717.         ;  Load and Execute                                             ;
  718.         ;...............................................................;
  719.  
  720.         LOADEXEC struc
  721.  
  722. lexecEnvironment         dw ?
  723. lexecCommandTail         dd ?
  724. lexecFCB_1               dd ?
  725. lexecFCB_2               dd ?
  726.  
  727.         LOADEXEC ends
  728.  
  729.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  730.         ;  Load Program                                                 ;
  731.         ;...............................................................;
  732.  
  733.         LOADPROG struc
  734.  
  735. lprogEnvironment         dw ?
  736. lprogCommandTail         dd ?
  737. lprogFCB_1               dd ?
  738. lprogFCB_2               dd ?
  739. lprogCSID                dd ?                   ; starting code address
  740. lprogSSSP                dd ?                   ; starting stack address
  741.  
  742.         LOADPROG ends
  743.  
  744.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  745.         ;  Get Buffered Input Line Structure                            ;
  746.         ;...............................................................;
  747.  
  748.         BUFLINE struc
  749.  
  750. bufMaxLength            db ?                    ; max bytes
  751. bufActualLength         db ?                    ; actual bytes read
  752. bufData                 db 128 dup(?)           ; actual bytes (any length)
  753.  
  754.         BUFLINE ends
  755.  
  756.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  757.         ;  Line Editor Structure                                        ;
  758.         ;...............................................................;
  759.  
  760.         LINEEDITOR struc
  761.  
  762. editCursor              dw ?                    ; cursor offset
  763. editMaxLength           dw ?                    ; max characters in buffer
  764. editMaxChars            dw ?                    ; max characters allowed
  765. editFlags               dw ?                    ; flags
  766. editPhysCursorRow       db ?                    ; beg of edit phys cursor pos
  767. editPhysCursorCol       db ?                    ; beg of edit phys cursor pos
  768. editBufPointer          dd ?                    ; pointer to client buffer
  769.  
  770.         LINEEDITOR ends
  771.  
  772. editInsertFlag          equ 8000h               ; insert mode
  773. editSearchFlag          equ 4000h               ; search mode
  774.  
  775.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  776.         ;  Clock Data                                                   ;
  777.         ;...............................................................;
  778.  
  779.         CLOCKDATA struc
  780.  
  781. cl_daysSince    dw ?                            ; since Jan 1
  782. cl_minutes      db ?
  783. cl_hours        db ?
  784. cl_hseconds     db ?
  785. cl_seconds      db ?
  786.  
  787.         CLOCKDATA ends
  788.  
  789.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  790.         ;  DOS Error Messages                                           ;
  791.         ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
  792.         ;                                                               ;
  793.         ;  All error messages are defined here.                         ;
  794.         ;                                                               ;
  795.         ;                                                               ;
  796.         ;...............................................................;
  797.  
  798. errInvalidFunction      equ 0001h
  799. errFileNotFound         equ 0002h
  800. errPathNotFound         equ 0003h
  801. errIllegalName          equ ( errPathNotFound )
  802.  
  803. errNoHandlesAvailable   equ 0004h
  804. errAccessDenied         equ 0005h
  805. errInvalidHandle        equ 0006h
  806. errArenaTrashed         equ 0007h
  807. errNotEnoughMemory      equ 0008h
  808. errInvalidBlock         equ 0009h
  809.  
  810. errInvalidAccess        equ 000Ch
  811. errInvalidDrive         equ 000Fh
  812. errCurrentDirectory     equ 0010h
  813.  
  814.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  815.         ;  Critical Error Flags                                         ;
  816.         ;...............................................................;
  817.  
  818. CRITERROR_IGNORE                equ 00
  819. CRITERROR_RETRY                 equ 01
  820. CRITERROR_TERMINATE             equ 02
  821. CRITERROR_FAILOPERATION         equ 03
  822.  
  823.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  824.         ;  BIOS Parameters                                              ;
  825.         ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
  826.         ;                                                               ;
  827.         ;  These definitions are part of the common BIOS access area    ;
  828.         ;  at seg 40:xxxx                                               ;
  829.         ;                                                               ;
  830.         ;...............................................................;
  831.  
  832. _BIOS_Memory            equ 0013h
  833. _BIOS_NumFixedDrives    equ 0075h
  834.  
  835.  
  836.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  837.         ;  Device Drivers Data Structures                               ;
  838.         ;...............................................................;
  839.  
  840. DEVICEINIT              equ 00h
  841. MEDIAREQUEST            equ 01h
  842. BUILDDPB                equ 02h
  843. IOCTLREAD               equ 03h
  844. DEVICEREAD              equ 04h
  845. NONDESTRREAD            equ 05h
  846. INPUTSTATUS             equ 06h
  847. INPUTFLUSH              equ 07h
  848. DEVICEWRITE             equ 08h
  849. DEVICEWRITEVERIFY       equ 09h
  850. OUTPUTSTATUS            equ 0ah
  851. OUTPUTFLUSH             equ 0bh
  852. IOCTLWRITE              equ 0ch
  853. OPENDEVICE              equ 0dh
  854. CLOSEDEVICE             equ 0eh
  855. REMOVABLEMEDIA          equ 0fh
  856. OUTPUTTILLBUSY          equ 10h
  857. GENERICIOCTL            equ 13h
  858. GETLOGICALDEVICE        equ 17h
  859. SETLOGICALDEVICE        equ 18h
  860. IOCTLQUERY              equ 19h
  861.  
  862.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  863.         ;  Internal Device Service Table                                ;
  864.         ;...............................................................;
  865.  
  866.         DEVSERVICETABLE  struc
  867.  
  868. devsrvEntries           db ?
  869. devsrvBranches          dw ?
  870.  
  871.         DEVSERVICETABLE  ends
  872.  
  873.  
  874.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  875.         ;  General Request Header Definition                            ;
  876.         ;...............................................................;
  877.  
  878.         DEVReqHeader struc
  879.  
  880. rhLength                db ?
  881. rhUnit                  db ?
  882. rhFunction              db ?
  883. rhStatus                dw ?
  884. rhReserved              db 8 dup ( ? )
  885.  
  886. ; extended definition
  887. rhMedia                 db ?                    ; Media id
  888.  
  889.         DEVReqHeader ends
  890.  
  891.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  892.         ;  Media Request Header Definition                              ;
  893.         ;...............................................................;
  894.  
  895.         MEDIAReqHeader struc
  896.  
  897. mrLength                db ?
  898. mrUnit                  db ?
  899. mrFunction              db ?
  900. mrStatus                dw ?
  901. mrReserved              db 8 dup ( ? )
  902.  
  903. mrMediaID               db ?                    ;
  904. mrReturn                db ?                    ; Return value
  905. mrVolumeID              dd ?                    ; volume identifier
  906.  
  907.         MEDIAReqHeader ends
  908.  
  909.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  910.         ;  DPB Request Header Definition                                ;
  911.         ;...............................................................;
  912.  
  913.         BUILDDPBReqHeader struc
  914.  
  915. bbrLength               db ?
  916. bbrUnit                 db ?
  917. bbrFunction             db ?
  918. bbrStatus               dw ?
  919. bbrReserved             db 8 dup ( ? )
  920.  
  921. bbrMediaID              db ?                    ;
  922. bbrFATSector            dd ?                    ; buffer with first FAT sector
  923. bbrBPBAddress           dd ?                    ; DPB address
  924.  
  925.         BUILDDPBReqHeader ends
  926.  
  927.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  928.         ;  Read/ Write Request Header Definition                        ;
  929.         ;...............................................................;
  930.  
  931.         READReqHeader struc
  932.  
  933. rwrLength               db ?
  934. rwrUnit                 db ?
  935. rwrFunction             db ?
  936. rwrStatus               dw ?
  937. rwrReserved             db 8 dup ( ? )
  938.  
  939. rwrMediaID              db ?                    ;
  940. rwrBuffer               dd ?                    ;
  941. rwrBytesReq             dw ?                    ;
  942. rwrStartSec             dw ?                    ; 
  943. rwrVolumeID             dd ?                    ; volume identifier
  944. rwrHugeStartSec         dd ?                    ; 32 bit sector
  945.  
  946.         READReqHeader ends
  947.  
  948.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  949.         ;  NonDestructive LookAhead Read Definition                     ;
  950.         ;...............................................................;
  951.  
  952.         NONDESTREADReqHeader struc
  953.  
  954. ndrLength               db ?
  955. ndrUnit                 db ?
  956. ndrFunction             db ?
  957. ndrStatus               dw ?
  958. ndrReserved             db 8 dup ( ? )
  959.  
  960. ndrCharRead             db ?                    ;
  961.  
  962.         NONDESTREADReqHeader ends
  963.  
  964.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  965.         ;  Device Definition Header                                     ;
  966.         ;...............................................................;
  967.  
  968.         DEVICEHEADER struc
  969.  
  970. devLink                 dd ?
  971. devAttributes           dw ?
  972. devStrategy             dw ?
  973. devInterrupt            dw ?
  974. devName                 db '????????'           ; character devices
  975.  
  976. ; extended definition ( non-standard )
  977. devTablePtr             dw ?
  978. devLogicalUnit          dw ?
  979.  
  980.         DEVICEHEADER ends
  981.  
  982. devUnits                equ devName             ; block devices
  983.  
  984.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  985.         ;  Device Definition Flags                                      ;
  986.         ;...............................................................;
  987.  
  988. DEV_STDINPUT            equ 0001h
  989. DEV_STDOUTPUT           equ 0002h
  990. DEV_NULL                equ 0004h
  991. DEV_CLOCK               equ 0008h
  992.  
  993. DEV_FASTCHARIO          equ 0010h               ; supports int 29 fast i/o
  994. DEV_LOGICALMAPPING      equ 0040h               ; supports logical dev mapping
  995. DEV_IOCTL               equ 0080h               ; supports IOCTL
  996.  
  997. DEV_REMOVABLEMEDIA      equ 0800h               ; supports removable media calls
  998.  
  999. DEV_OUTPUTTILLBUSY      equ 2000h               ; supports output till busy
  1000. DEV_IOCTL_RW            equ 4000h               ; supports IOCTL read/write
  1001. DEV_CHAR                equ 8000h               ; character mode device
  1002.  
  1003. DEV_BLOCKEXTNADDRESS    equ 0002h               ; block device support 32 bit extended address
  1004. DEV_REQUIRESFATSECTOR   equ 2000h               ; requires FAT sector address
  1005.  
  1006.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  1007.         ;  Device Errors And Status                                     ;
  1008.         ;...............................................................;
  1009.  
  1010. OP_ERROR                equ 8000h
  1011. OP_NODATA               equ 0300h
  1012. OP_BUSY                 equ 0200h
  1013. OP_DONE                 equ 0100h
  1014. OP_EXITERROR            equ 8100h
  1015.  
  1016. devErrWriteProtectViol  equ  0
  1017. devErrUnknownUnit       equ  1
  1018. devErrDeviceNotReady    equ  2
  1019. devErrUnknownCommand    equ  3
  1020. devErrCRCerr            equ  4
  1021. devErrBadDriveReq       equ  5
  1022. devErrSeekError         equ  6
  1023. devErrUnknownMedia      equ  7
  1024. devErrSectorNotFound    equ  8
  1025. devErrPrinterOutPaper   equ  9
  1026. devErrWriteFault        equ 10
  1027. devErrReadFault         equ 11
  1028. devErrGeneralFailure    equ 12
  1029. devErrInvalidDiskChange equ 15
  1030.  
  1031.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  1032.         ;  Con Definitions                                              ;
  1033.         ;...............................................................;
  1034.  
  1035. BIOS_ConRead            equ 00h
  1036. BIOS_ConStatus          equ 01h
  1037. BIOS_ConReadFlags       equ 02h
  1038.  
  1039.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  1040.         ;  Comm Definitions                                             ;
  1041.         ;...............................................................;
  1042.  
  1043. BIOS_ComInit            equ 00h                 ; returns line status/ modem status
  1044. BIOS_ComWrite           equ 01h                 ; returns line status/ modem status
  1045. BIOS_ComRead            equ 02h                 ; returns line status/ modem status
  1046. BIOS_ComStatus          equ 03h                 ; returns line status/ modem status
  1047.  
  1048. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1049. ;  Comm Line Status Register
  1050. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1051. CommLS_TimeOut          equ 8000h
  1052. CommLS_ShiftRegEmpty    equ 4000h
  1053. CommLS_HoldRegEmpty     equ 2000h
  1054. CommLS_BreakDetect      equ 1000h
  1055.  
  1056. CommLS_FE               equ 0800h
  1057. CommLS_PE               equ 0400h
  1058. CommLS_OE               equ 0200h
  1059. CommLS_DataAvail        equ 0100h
  1060.  
  1061. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1062. ;  Comm Modem Status Register
  1063. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1064. CommMS_RLSD             equ 0080h
  1065. CommMS_RING             equ 0040h
  1066. CommMS_DSR              equ 0020h
  1067. CommMS_CTS              equ 0010h
  1068.  
  1069. CommMS_ChgRLSD          equ 0008h
  1070. CommMS_ChgRING          equ 0004h
  1071. CommMS_ChgDSR           equ 0002h
  1072. CommMS_ChgCTS           equ 0001h
  1073.  
  1074.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  1075.         ;  Prn Definitions                                              ;
  1076.         ;...............................................................;
  1077.  
  1078. BIOS_PrnWrite           equ 00h                 ; returns status
  1079. BIOS_PrnInit            equ 01h
  1080. BIOS_PrnStatus          equ 02h
  1081.  
  1082. Prn_RetryCount          equ 03
  1083.  
  1084. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1085. ;  Print Status
  1086. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  1087. Prn_NotBusy             equ 8000h
  1088. Prn_Ack                 equ 4000h
  1089. Prn_OutOfPaper          equ 2000h
  1090. Prn_Selected            equ 1000h
  1091.  
  1092. Prn_IOError             equ 0800h
  1093. Prn_TimeOut             equ 0100h
  1094.  
  1095.         ;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
  1096.         ;  Define Structure Sizes                                       ;
  1097.         ;...............................................................;
  1098.  
  1099. sizedevName             equ 8
  1100. sizefnName              equ 8
  1101. sizefnExtension         equ 3
  1102. sizeFILENAME            equ sizefnName + sizefnExtension
  1103. sizeTempFILENAME        equ sizeFILENAME + 1
  1104. sizeTempExpandedFCBNAME equ sizeFILENAME + 4    ; drive: + null
  1105.  
  1106. sizeDIRENTRY            equ size DIRENTRY 
  1107. sizeFT                  equ size FT
  1108. sizeSFT                 equ size SFT
  1109. sizeFCB                 equ size FCB 
  1110. sizeExtendedFCBHdr      equ size ExtendedFCBHdr
  1111. sizeCLOCKDATA           equ size CLOCKDATA
  1112.  
  1113. sizeDISKACCESS          equ size DISKACCESS
  1114. sizeDIRACCESS           equ size DIRACCESS
  1115. sizeFINDENTRY           equ size FINDENTRY
  1116. sizeDPB                 equ size DPB 
  1117. sizeCDS                 equ size CDS 
  1118. sizeMEMBLOCK            equ size MEMBLOCK 
  1119. sizeCCB                 equ size CCB
  1120. sizeCCBData             equ 512     
  1121. sizePSP                 equ size PSP
  1122. sizePSPHandleTable      equ 20
  1123.  
  1124. sizeSector              equ 512
  1125. sizePage                equ 512
  1126. sizeParasPerPage        equ (sizePage/ 16 )
  1127.  
  1128. sizeCmdLine             equ 128
  1129. sizeCmdLineStruct       equ (sizeCmdLine + 3)
  1130. sizeLINEEDITOR          equ size LINEEDITOR
  1131. sizeStdRedirec          equ size STDREDIREC
  1132.  
  1133. sizeEXECSTATE           equ size EXECSTATE
  1134. sizeEXEHEADER           equ size EXEHEADER
  1135. sizeLOADEXEC            equ size LOADEXEC
  1136. sizeLOADPROG            equ size LOADPROG
  1137.  
  1138.         ;  Device Headers
  1139.  
  1140. sizeDEVReqHeader        equ size DEVReqHeader
  1141. sizeREADReqHeader       equ size READReqHeader
  1142. sizeMEDIAReqHeader      equ size MEDIAReqHeader
  1143. sizeBUILDDPBReqHeader   equ size BUILDDPBReqHeader
  1144.  
  1145. sizeMaxReqHeader        equ sizeREADReqHeader
  1146.  
  1147. sizeDEVICEHEADER        equ size DEVICEHEADER
  1148.  
  1149.  
  1150.